<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let arr = [11, 12, 13, 14, 15]
        //从前面开始查找
        let res1 = arr.find(value => value > 13)
        let res2 = arr.findIndex(value => value > 13)
        //从后面开始查找
        let res3 = arr.findLast(value => value > 13)
        let res4 = arr.findLastIndex(value => value > 13)
        console.log(res1, res2, res3, res4) //13 3 15 4
        let res5 = arr.find(value => value % 2 === 0)
        let res6 = arr.findLast(value => value % 2 === 0)
        console.log(res5, res6) //12 14
    </script>
</body>

</html>